import React, { PureComponent } from 'react';
import { Menu } from 'antd';
import styles from './TabBar.less';

const { Item } = Menu;

export default class extends PureComponent {
  render() {
    const { onTypeChange } = this.props;

    return (
      <Menu mode="horizontal" className={styles.tabBar} defaultSelectedKeys={['热门']}>
        <Item key="关注" onClick={() => onTypeChange(3)}>
          关注
        </Item>
        <Item key="热门" onClick={() => onTypeChange(1)}>
          热门
        </Item>
        <Item key="最新" onClick={() => onTypeChange(2)}>
          最新
        </Item>
      </Menu>
    );
  }
}
